Optimal. Leaf size=29 \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos ^n(x)}}{\sqrt{a}}\right )}{\sqrt{a} n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0769956, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.267, Rules used = {3230, 266, 63, 208} \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos ^n(x)}}{\sqrt{a}}\right )}{\sqrt{a} n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3230
Rule 266
Rule 63
Rule 208
Rubi steps
\begin{align*} \int \frac{\tan (x)}{\sqrt{a+b \cos ^n(x)}} \, dx &=-\operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x^n}} \, dx,x,\cos (x)\right )\\ &=-\frac{\operatorname{Subst}\left (\int \frac{1}{x \sqrt{a+b x}} \, dx,x,\cos ^n(x)\right )}{n}\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{-\frac{a}{b}+\frac{x^2}{b}} \, dx,x,\sqrt{a+b \cos ^n(x)}\right )}{b n}\\ &=\frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos ^n(x)}}{\sqrt{a}}\right )}{\sqrt{a} n}\\ \end{align*}
Mathematica [A] time = 0.0152863, size = 29, normalized size = 1. \[ \frac{2 \tanh ^{-1}\left (\frac{\sqrt{a+b \cos ^n(x)}}{\sqrt{a}}\right )}{\sqrt{a} n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.02, size = 24, normalized size = 0.8 \begin{align*} 2\,{\frac{1}{n\sqrt{a}}{\it Artanh} \left ({\frac{\sqrt{a+b \left ( \cos \left ( x \right ) \right ) ^{n}}}{\sqrt{a}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.96476, size = 192, normalized size = 6.62 \begin{align*} \left [\frac{\log \left (\frac{b \cos \left (x\right )^{n} + 2 \, \sqrt{b \cos \left (x\right )^{n} + a} \sqrt{a} + 2 \, a}{\cos \left (x\right )^{n}}\right )}{\sqrt{a} n}, -\frac{2 \, \sqrt{-a} \arctan \left (\frac{\sqrt{b \cos \left (x\right )^{n} + a} \sqrt{-a}}{a}\right )}{a n}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (x \right )}}{\sqrt{a + b \cos ^{n}{\left (x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan \left (x\right )}{\sqrt{b \cos \left (x\right )^{n} + a}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]